package com.gk.service.impl;

import com.gk.bean.GuoYaoBackDto.*;
import com.gk.dao.*;
import com.gk.service.GuoYaoBackWriteService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@Slf4j
public class GuoYaoBackWriteServiceImpl implements GuoYaoBackWriteService {
    @Resource
    private ZxyZlyhjlGuoyaoDao zxyZlyhjlGuoyaoDao;

    @Override
    public GHttpResult backWriteMaintenanceRecord(List<ZxyZlyhjlGuoyao> zxyZlyhjlGuoyao) {
        int row = 0;
        for (ZxyZlyhjlGuoyao zlyhjlGuoyao : zxyZlyhjlGuoyao) {
            row = row + zxyZlyhjlGuoyaoDao.insertSelective(zlyhjlGuoyao);
        }
        return new GHttpResult(1, "成功回写" + row + "条记录");
    }

    @Resource
    private ZxyZlbuybackandbaosunreviewjlGuoyaoDao zxyZlbuybackandbaosunreviewjlGuoyaoDao;

    @Override
    public GHttpResult backWriteBuyBackOrLossRecord(List<ZxyZlbuybackandbaosunreviewjlGuoyao> zlbuybackandbaosunreviewjlGuoyaoList) {
        int row = 0;
        for (ZxyZlbuybackandbaosunreviewjlGuoyao zlbuybackandbaosunreviewjlGuoyao : zlbuybackandbaosunreviewjlGuoyaoList) {
            row = row + zxyZlbuybackandbaosunreviewjlGuoyaoDao.insertSelective(zlbuybackandbaosunreviewjlGuoyao);
        }
        return new GHttpResult(1, "成功回写" + row + "条记录");
    }

    @Resource
    private ZxyZlnoqualifiedjlGuoyaoDao zxyZlnoqualifiedjlGuoyaoDao;

    @Override
    public GHttpResult backWriteDisQualifiedRecord(List<ZxyZlnoqualifiedjlGuoyao> zlnoqualifiedjlGuoyaoList) {
        int row = 0;
        for (ZxyZlnoqualifiedjlGuoyao zlnoqualifiedjlGuoyao : zlnoqualifiedjlGuoyaoList) {
            row = row + zxyZlnoqualifiedjlGuoyaoDao.insertSelective(zlnoqualifiedjlGuoyao);
        }
        return new GHttpResult(1, "成功回写" + row + "条记录");
    }

    @Resource
    private ZxyZlsalebackjlGuoyaoDao zxyZlsalebackjlGuoyaoDao;

    @Override
    public GHttpResult backWriteSaleBackRecord(List<ZxyZlsalebackjlGuoyao> zlsalebackjlGuoyaoList) {
        int row = 0;
        for (ZxyZlsalebackjlGuoyao zlsalebackjlGuoyao : zlsalebackjlGuoyaoList) {
            row = row + zxyZlsalebackjlGuoyaoDao.insertSelective(zlsalebackjlGuoyao);
        }
        return new GHttpResult(1, "成功回写" + row + "条记录");
    }

    @Resource
    private ZxyZlsalereviewjlGuoyaoDao zxyZlsalereviewjlGuoyaoDao;

    @Override
    public GHttpResult backWriteSaleReviewRecord(List<ZxyZlsalereviewjlGuoyao> zlsalereviewjlGuoyaoList) {
        int row = 0;
        for (ZxyZlsalereviewjlGuoyao zxyZlsalereviewjlGuoyao : zlsalereviewjlGuoyaoList) {
            row = row + zxyZlsalereviewjlGuoyaoDao.insertSelective(zxyZlsalereviewjlGuoyao);
        }
        return new GHttpResult(1, "成功回写" + row + "条记录");
    }

    @Resource
    private ZxyZlbuyzlysjlGuoyaoDao zxyZlbuyzlysjlGuoyaoDao;

    @Override
    public GHttpResult backWriteBuyCheckedRecord(List<ZxyZlbuyzlysjlGuoyao> zlbuyzlysjlGuoyaoList) {
        int row = 0;
        for (ZxyZlbuyzlysjlGuoyao zxyZlbuyzlysjlGuoyao : zlbuyzlysjlGuoyaoList) {
            row = row + zxyZlbuyzlysjlGuoyaoDao.insertSelective(zxyZlbuyzlysjlGuoyao);
        }
        return new GHttpResult(1, "成功回写" + row + "条记录");
    }

    @Resource
    private ZxyZlbuyshjlGuoyaoDao zxyZlbuyshjlGuoyaoDao;

    @Override
    public GHttpResult backWriteBuyReceiveRecord(List<ZxyZlbuyshjlGuoyao> zlbuyshjlGuoyaoList) {
        int row = 0;
        for (ZxyZlbuyshjlGuoyao zlbuyshjlGuoyao : zlbuyshjlGuoyaoList) {
            row = row + zxyZlbuyshjlGuoyaoDao.insertSelective(zlbuyshjlGuoyao);
        }
        return new GHttpResult(1, "成功回写" + row + "条记录");
    }

    @Resource
    private ZxyZlwtysjlGuoyaoDao zxyZlwtysjlGuoyaoDao;

    @Override
    public GHttpResult backWriteTransportRecord(List<ZxyZlwtysjlGuoyao> zlwtysjlGuoyaoList) {
        int row = 0;
        for (ZxyZlwtysjlGuoyao zlwtysjlGuoyao : zlwtysjlGuoyaoList) {
            row = row + zxyZlwtysjlGuoyaoDao.insertSelective(zlwtysjlGuoyao);
        }
        return new GHttpResult(1, "成功回写" + row + "条记录");
    }

    @Resource
    private ZxyZlgoodsstocksGuoyaoDao zxyZlgoodsstocksGuoyaoDao;

    @Override
    public GHttpResult backWriteGoodsStocks(List<ZxyZlgoodsstocksGuoyao> zlgoodsstocksGuoyaoList) {
        int row = 0;
        for (ZxyZlgoodsstocksGuoyao zlgoodsstocksGuoyao : zlgoodsstocksGuoyaoList) {
            row = row + zxyZlgoodsstocksGuoyaoDao.insertSelective(zlgoodsstocksGuoyao);
        }
        return new GHttpResult(1, "成功回写" + row + "条记录");
    }
}
